package com.crm.aftersale.service.impl;

import com.crm.aftersale.domain.OrderGoods;
import com.crm.aftersale.mapper.OrderGoodsMapper;
import com.crm.aftersale.service.IOrderGoodsService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * <p>
 *  服务实现类
 * </p>
 *
 * @author author
 * @since 2024-07-26
 */
@Service
public class OrderGoodsServiceImpl extends ServiceImpl<OrderGoodsMapper, OrderGoods> implements IOrderGoodsService {


    @Autowired
   private OrderGoodsMapper orderGoodsMapper;
    @Override
    public Integer updateByOb(List<OrderGoods> orderGoods) {

        int insert = 0;
        try {
            insert = orderGoodsMapper.updateById(orderGoods.get(0));
            return insert;
        } catch (Exception e) {
            return 0;
        }
    }
}
